<html>
   <head>
      <title></title>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <script src="dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=5"></script>
      <script>         
	var map = null;                  
	function GetMap()         
	{            
		map = new VEMap('myMap');            
		map.LoadMap(new VELatLong(36.12247, -115.17112), 15,'h' ,false);         
	}         

//Add Pushpins to the Map
function LoadVEPins()
{

//First, create an array of points
	var myPinArray = new Array(
			new VELatLong(36.13114, -115.16561), 
			new VELatLong(36.11467, -115.18032), 
			new VELatLong(36.11450, -115.16402));
//Loop through the points and use AddShape() to add them to the map
	for(x in myPinArray)
	{
	 //Instantiate the VE Shape - Pins
	 var myVEShapePins = new VEShape(VEShapeType.Pushpin, myPinArray[x]);
	//Set the title for each pushpins
	myVEShapePins.SetTitle("Pushpin " + x);
	 //Add Pins to the map
	 map.AddShape(myVEShapePins);
	}
}


//Add Polylines to the Map
function LoadVELine()
{

	//Create an array of lat/lons
	var myLineArray = new Array(	
			new VELatLong(36.13114, -115.16561), 			
			new VELatLong(36.11467, -115.18032), 
			new VELatLong(36.11450, -115.16402),
			new VELatLong(36.13114, -115.16561));
	//Instantiate the VE Shape - Line
	var myVEShapeLine = new VEShape(VEShapeType.Polyline, myLineArray);
	//Set the line color
	myVEShapeLine.SetLineColor(new VEColor(0, 255, 0, 1));
	//Set the title for the pushpin
	myVEShapeLine.SetTitle("My Polyline");
	//Add the line to the map
	map.AddShape(myVEShapeLine);


}

//Add Polygon to the Map
function LoadVEPolygon()
{
	//Create an array of lat/lons
	var myPolygonArray = new Array(	
			new VELatLong(36.13114, -115.16561), 			
			new VELatLong(36.11467, -115.18032), 
			new VELatLong(36.11450, -115.16402),
			new VELatLong(36.13114, -115.16561));
	//Instantiate the VE Shape - Polygon
	var myVEShapePolygon = new VEShape(VEShapeType.Polygon, myPolygonArray);
	//Set the polygon shading color
	myVEShapePolygon.SetFillColor(new VEColor(0, 0, 255, .1));
	//Set the title for the pushpin
	myVEShapePolygon.SetTitle("My Polygon");
	//Add the polygon to the map
	map.AddShape(myVEShapePolygon);

}

      </script>
   </head>
   <body onload="GetMap();">
      <div id="myMap" style="position:relative; width:800px; height:600px;"></div>

  <INPUT TYPE=BUTTON OnClick="LoadVEPins();" VALUE="Load Pins">
  <INPUT TYPE=BUTTON OnClick="LoadVELine();" VALUE="Draw Line">
  <INPUT TYPE=BUTTON OnClick="LoadVEPolygon();" VALUE="Shade Polygon">
   </body>
</html>
